﻿/*
* @autor: hectorea
* @date: 01/08/2012
* @programming interview 11
*/

namespace Factorial
{
    internal static class IntExtension
    {
        /// <summary>
        /// Get the Factorial of any integer number
        /// </summary>
        /// <param name="number">Integer Value</param>
        /// <returns>The factorial number of the given a number</returns>
        public static int Factorial(this int number)
        {
            if (number == 1)
                return 1;
            else
                return Factorial(number - 1) * number;
        }
    }
}
